package com.freak.neteasecloudmusic.modules.find.recommend.songlist.detail.comment.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.freak.neteasecloudmusic.modules.find.recommend.songlist.detail.comment.adapter.CommentAdapter;

/**
 * Created by Freak on 2020/3/7.
 */
public class CommentHeadEntity implements Parcelable, MultiItemEntity {
    private String id;
    private String url;
    private String context;
    private String author;

    public CommentHeadEntity() {
    }

    protected CommentHeadEntity(Parcel in) {
        id = in.readString();
        url = in.readString();
        context = in.readString();
        author = in.readString();
    }

    public static final Creator<CommentHeadEntity> CREATOR = new Creator<CommentHeadEntity>() {
        @Override
        public CommentHeadEntity createFromParcel(Parcel in) {
            return new CommentHeadEntity(in);
        }

        @Override
        public CommentHeadEntity[] newArray(int size) {
            return new CommentHeadEntity[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(url);
        dest.writeString(context);
        dest.writeString(author);
    }

    @Override
    public int getItemType() {
        return CommentAdapter.COMMENT_HEAD;
    }
}
